//
//  MeTopView.m
//  QT
//
//  Created by 甘世清 on 2024/12/30.
//

#import "MeTopView.h"

@implementation MeTopView

- (void)SQ_UIViewForSelfView{
    self.backgroundColor = SQColor(@"#E8DFFF");
    [self addSubview:self.headerView];
    [self.headerView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.width.mas_equalTo(200);
            make.height.mas_equalTo(150);
        make.top.equalTo(self).offset(TopHeight+10);
    }];
    
}
-(void)SQ_Ui{
    [self.headerView.imageView sd_setImageWithURL:SQURLImage([UserModel share].portrait) placeholderImage:SQGetImage(@"2")];
    self.headerView.text = [UserModel share].name;
}
- (SQCustomButton *)headerView{
    if (!_headerView) {
        _headerView = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(120, 120) midmargin:12];
        _headerView.font = FONT_SEMIBOLD(26);
        _headerView.textColor = SQColor333333;
        _headerView.imageView.clipsToBounds = YES;
        _headerView.imageView.contentMode = UIViewContentModeScaleAspectFill;
        _headerView.imageView.layer.cornerRadius = 60;
        _headerView.imageView.layer.masksToBounds = YES;
        _headerView.imageView.layer.borderWidth = 1;
        _headerView.imageView.layer.borderColor = UIColor.whiteColor.CGColor;
    }
    return _headerView;
}

@end
